package com.cooksys.film_rental.dao;

import java.util.List;

import com.cooksys.film_rental.model.Film;
import com.cooksys.film_rental.model.Inventory;
import com.cooksys.film_rental.model.Rental;
import com.cooksys.film_rental.model.Store;

/**
 * Data access object for the {@link Inventory} class
 * 
 * @author Peter Zastoupil
 * 
 */
public interface InventoryDao {

	/**
	 * 
	 * @param inventoryId
	 *            the inventoryId to search by
	 * @return the {@link Inventory} object associated with the given
	 *         inventoryId
	 */
	public Inventory getInventoryByInventoryId(Integer inventoryId);

	/**
	 * 
	 * @param store
	 *            the {@link Store} to search by
	 * @return a List of {@link Inventory} objects associated with the given
	 *         store
	 */
	public List<Inventory> searchInventoriesByStore(Store store);

	/**
	 * 
	 * @param film
	 *            the {@link Film} to search by
	 * @return a List of {@link Inventory} objects associated with the given
	 *         film
	 */
	public List<Inventory> searchInventoriesByFilm(Film film);

	/**
	 * 
	 * @param rental
	 *            the {@link Rental} to search by
	 * @return the {@link Inventory} object associated with the given rental
	 */
	public Inventory getInventoryByRental(Rental rental);

	/**
	 * 
	 * @param film
	 *            the {@link Film} object that is associated with the returned
	 *            {@link Inventory} object
	 * @param store
	 *            the {@link Store} object from which the inventory object is to
	 *            be retrieved
	 * @return an available {@link Inventory} object from the given store that
	 *         corresponds to the given film
	 */
	public Inventory getInventoryByFilmAndStore(Film film, Store store);

}
